package com.gama.pay.alipay.service;

import com.gama.pay.alipay.dal.UserPayRepository;
import com.gama.pay.alipay.pojo.UserPay;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserPayServiceImpl implements UserPayService {
    
    @Autowired
    private UserPayRepository userPayRepository;

    @Override
    public void insert(UserPay userPay) {
        userPayRepository.save(userPay);
    }

    @Override
    public Iterable<UserPay> getByUserId(String userId){
        return userPayRepository.findByUserId(userId);
    }
}
